package com.rocket.consumer;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.Message;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(topic = "topicB",consumerGroup = "topicB-group")
public class TalkConsumerB implements RocketMQListener<String> {
    @Override
    public void onMessage(String reHi) {
        //这里应该接到 你也好的消息
        System.out.println("talkB接收到问候:"+reHi);
    }
}
